<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .foo {
        width: 300px;
        height: 300px;
        background-color: brown;
        display: grid;
        place-items: center; /* 是同时设置 align-items 和 justify-items 的快速方法实现超级居中，使得内容能够在父级内完美居中，而不管内部大小。  */
      }
      .bar {
        width: 100px;
        height: 100px;
        background-color: burlywood;
      }
    </style>
  </head>
  <body>
    <div class="foo">
      <div class="bar"></div>
    </div>
  </body>
</html>
